# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.                  )

pkgname=dirscraper
pkgver=16.e752450
pkgrel=9
pkgdesc='OSINT Scanning tool which discovers and maps directories found in javascript files hosted on a website.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
arch=('any')
url='https://github.com/Cillian-Collins/dirscraper'
license=('custom:unknown')
depends=('python' 'python-requests' 'python-argparse' 'python-beautifulsoup4'
         'python-html5lib')
makedepends=('git')
provides=('dirscraper')
source=("git+https://github.com/Cillian-Collins/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  # ...
  sed -i '1i\#!/usr/bin/python3' "$pkgname.py"
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
}

